Workaround
Both classes are in same workspace, rename one of the class name and it will resolve problem.
Both classes are in frameworks, fork one of the repos and rename class name and use fork repo instead of actual repo, it will resolve problem.
In general, you have to rename one of the class name in order to run your project. You just have to think about how to rename them based upon your project settings.